package it.polimi.swKnights.SWIMv2.ejb.entityBeans;

import java.io.Serializable;

public class FriendshipRequestPk implements Serializable
{
	private String requestedName;
	
	private String applicantName;
	
	/*
	 * Serial Version ID
	 */
	
	private static final long serialVersionUID = -2803477195476494392L;
	
	/*
	 * equals and hashCode
	 */

	@Override
	public int hashCode()
	{
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((requestedName == null) ? 0 : requestedName.hashCode());
		result = prime * result
				+ ((applicantName == null) ? 0 : applicantName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj)
	{
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		FriendshipRequestPk other = (FriendshipRequestPk) obj;
		if (requestedName == null)
		{
			if (other.requestedName != null)
				return false;
		} else if (!requestedName.equals(other.requestedName))
			return false;
		if (applicantName == null)
		{
			if (other.applicantName != null)
				return false;
		} else if (!applicantName.equals(other.applicantName))
			return false;
		return true;
	}
	
	/*
	 * Getters and setters
	 */

	public String getRequested()
	{
		return requestedName;
	}

	public void setRequested(String requested)
	{
		this.requestedName = requested;
	}

	public String getApplicant()
	{
		return applicantName;
	}

	public void setApplicant(String applicant)
	{
		this.applicantName = applicant;
	}
	
	
}

